{extend name="common/base-xml" /}
<!--title-->
{block name="titlekeyword"}
<title>{$content}</title>

{/block}
<!--下面 每个页面的特色css-->
{block name="titleStyle"}
<style type="text/css">



</style>

{/block}
<!--代码主要内容-->
{block name="main"}
<h6>向服务器传数组</h6>
<div id="logos">
	<button onclick="changess()">点击</button>
		<img src="" class="qrcode" alt="二维码展示"/>
	
	</div>

<h5>页面代码</h5>	
{literal}
<pre>
	&lt;div id="logos">
		&lt;button onclick="changess()">点击&lt;/button>	
&lt;/div>

&lt;script type="text/javascript">
	function changess()
	{
		console.log("dfsdfsbf");
	 var logos = document.getElementById ('logos');
	$.ajax({
			 type: "GET",
			 url: "../../../note.php/jquery/Index/index23",
			// data: '',
			data:{
				name:"和经开",
				age:25
				
				},
			 dataType: "json",
			 success: function(r){
				 console.log(r)
						if (r.code==200) { //console.log(r); 
						var path = 'data:image/png;base64,'+r.data; //给img的sec赋值。
						console.log(path);
						 $("#logos").html("");
						
						 logos.html("");
						 console.log( logos.html(""));
						 }else{
							alert(r.err); 
							}
						}
		 });
	}
&lt;/script>
<h5>后台</h5>
$where["name"] = input('get.name');
$where["age"] = input('get.age');
return json($where);
<h5>注意 url: "../../../note.php/jquery/Index/index23",  和  url: "../../../jquery/Index/index23", 的转换 <br/>
请打开f12 看过程
</h5>




</pre>
{/literal}




<script type="text/javascript">
	function changess()
	{
		console.log("dfsdfsbf");
	 var logos = document.getElementById ('logos');
	$.ajax({
			 type: "GET",
			 url: "../../../jquery/Index/index23",
			// data: '',
			data:{
				name:"和经开",
				age:25
				
				},
			 dataType: "json",
			 success: function(r){
				 console.log(r)
						if (r.code==200) { //console.log(r); 
						var path = 'data:image/png;base64,'+r.data; //给img的sec赋值。
						console.log(path);
						 $("#logos").html("");
						
						 logos.html("");
						 console.log( logos.html(""));
						 }else{
							alert(r.err); 
							}
						}
		 });
	}
	</script>



 {/block}